#include "../../client/rpc_client.hpp"

int main()
{
    //实例化客户端对象
    //创建主题
    //向主题发布消息
    auto client = std::make_shared<rpc::client::TopicClient>("127.0.0.1",7070);
    bool ret = client->create("hello");
    if(ret == false)
    {
        LOG(ERROR,"创建主题失败");
        return 1;
    }
    for(int i = 0;i<10;i++)
    {
        client->publish("hello","Hello World-"+std::to_string(i));
    }
    //关闭连接
    client->shutdown();
    return 0;
}